<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>QQ音乐-首页</title>
  <style>
    /* 基础重置：统一盒模型、字体、背景 */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: "Microsoft Yahei", sans-serif;
    }
    body {
      background-color: #fff; /* 页面背景为白色，更贴近参考 */
      color: #333;
    }
    .container {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }

    /* 头部：Logo + 文字 + 图标 */
    header {
      display: flex;
      align-items: center;
      margin-bottom: 30px;
    }
    .logo {
      width: 30px;
      height: 30px;
      background: url("https://imgcache.qq.com/music/photo/radio_brand/00.png") no-repeat center;
      background-size: contain;
      margin-right: 8px;
    }
    h1 {
      font-size: 20px; /* 缩小标题字号，更贴近参考 */
      color: #000;
      margin-right: 10px; /* 给标题和图标之间留间距 */
    }
    .qq-music-icon {
      width: 170px; /* 设置图标宽度 */
      height: 30px; /* 设置图标高度 */
      padding-left: 50px;
    }

    /* 模块通用样式：标题居中 + 标签栏间距 */
    .section {
      margin-bottom: 40px;
    }
    .section-title {
      font-size: 22px;
      font-weight: bold;
      margin-bottom: 25px;
      color: #000;
      text-align: center; /* 标题居中 */
    }
    .tabs {
      display: flex;
      justify-content: center; /* 标签栏居中 */
      margin-bottom: 25px;
    }
    .tab {
      padding: 5px 15px;
      margin: 0 8px; /* 调整标签间距 */
      cursor: pointer;
      color: #666;
      font-size: 14px; /* 缩小标签字号 */
      transition: color 0.3s, border-bottom 0.3s;
    }
    .tab.active {
      color: #31c27c;
      border-bottom: 2px solid #31c27c; /* 下划线更细，贴近参考 */
    }
    .tab:hover {
      color: #31c27c;
    }

    /* 歌单推荐：5列布局 + 封面/文字细节 */
    .playlist-container {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 25px; /* 增大歌单间距 */
    }
    .playlist-card {
      cursor: pointer;
    }
    .playlist-cover {
      width: 100%;
      height: auto;
      border-radius: 4px; /* 圆角更小 */
      margin-bottom: 8px;
    }
    .playlist-title {
      font-size: 14px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 4px;
      color: #333; /* 标题用深灰色 */
    }
    .playlist-playcount {
      font-size: 12px;
      color: #999;
    }

    /* 新歌首发 & MV 通用列表：3列布局 + 行内对齐 */
    .list-container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
    }
    .list-item {
      display: flex;
      align-items: center;
      padding: 10px 0;
      border-bottom: none; /* 移除底部边框，更贴近参考 */
    }
    .list-cover {
      width: 50px; /* 缩小封面尺寸 */
      height: 50px;
      border-radius: 2px;
      margin-right: 10px;
    }
    .list-info {
      flex: 1;
    }
    .list-title {
      font-size: 14px;
      margin-bottom: 3px;
      color: #333;
    }
    .list-artist {
      font-size: 12px;
      color: #999;
    }
    .list-duration {
      font-size: 12px;
      color: #999;
    }
  </style>
</head>
<body>
  <div class="container">
    <header>
      <div class="logo"></div>
      <img src="imgs/qqmusic.png" alt="QQ音乐图标" class="qq-music-icon">
      <!-- 引入QQ音乐图标 --> 
    </header>

    <!-- 歌单推荐模块 -->
    <section class="section">
      <h2 class="section-title">歌单推荐</h2>
      <div class="tabs">
        <div class="tab active">为你推荐</div>
        <div class="tab">运动</div>
        <div class="tab">网络歌曲</div>
        <div class="tab">黑胶</div>
        <div class="tab">官方歌单</div>
        <div class="tab">情歌</div>
      </div>
      <div class="playlist-container">
        <div class="playlist-card">
          <img
            src="https://picsum.photos/200/200?random=1"
            alt="歌单封面"
            class="playlist-cover"
          />
          <div class="playlist-title">翻唱专场｜只听翻唱也能惊艳全场</div>
          <div class="playlist-playcount">播放量：69.6万</div>
        </div>
        <div class="playlist-card">
          <img
            src="https://picsum.photos/200/200?random=2"
            alt="歌单封面"
            class="playlist-cover"
          />
          <div class="playlist-title">治愈女声｜把伤感唱成疗伤</div>
          <div class="playlist-playcount">播放量：77.2万</div>
        </div>
        <div class="playlist-card">
          <img
            src="https://picsum.photos/200/200?random=3"
            alt="歌单封面"
            class="playlist-cover"
          />
          <div class="playlist-title">慢开一朵浪漫，成全温柔</div>
          <div class="playlist-playcount">播放量：52.5万</div>
        </div>
        <div class="playlist-card">
          <img
            src="https://picsum.photos/200/200?random=4"
            alt="歌单封面"
            class="playlist-cover"
          />
          <div class="playlist-title">好听冷门｜英文歌！轻快&小众</div>
          <div class="playlist-playcount">播放量：223.0万</div>
        </div>
        <div class="playlist-card">
          <img
            src="https://picsum.photos/200/200?random=5"
            alt="歌单封面"
            class="playlist-cover"
          />
          <div class="playlist-title">华语情歌｜关于爱与时间的时光</div>
          <div class="playlist-playcount">播放量：523.2万</div>
        </div>
      </div>
    </section>

    <!-- 新歌首发模块 -->
    <section class="section">
      <h2 class="section-title">新歌首发</h2>
      <div class="tabs">
        <div class="tab active">全部</div>
        <div class="tab">华语</div>
        <div class="tab">港台</div>
        <div class="tab">欧美</div>
        <div class="tab">韩国</div>
        <div class="tab">日本</div>
      </div>
      <div class="list-container">
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=6"
            alt="歌曲封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">Komorebi</div>
            <div class="list-artist">Rionos (りおのす)</div>
          </div>
          <div class="list-duration">02:58</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=7"
            alt="歌曲封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">张灯结彩</div>
            <div class="list-artist">张灯结彩乐队</div>
          </div>
          <div class="list-duration">03:26</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=8"
            alt="歌曲封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">你离开的事实</div>
            <div class="list-artist">July (줄라이)</div>
          </div>
          <div class="list-duration">04:30</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=9"
            alt="歌曲封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">纪念</div>
            <div class="list-artist">于文文</div>
          </div>
          <div class="list-duration">04:17</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=10"
            alt="歌曲封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">一路向北（《头文字D》电影插曲）</div>
            <div class="list-artist">周杰伦</div>
          </div>
          <div class="list-duration">05:35</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=11"
            alt="歌曲封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">问花（电影《白蛇2：青蛇劫起》主题曲）</div>
            <div class="list-artist">周深</div>
          </div>
          <div class="list-duration">05:00</div>
        </div>
      </div>
    </section>

    <!-- MV 模块 -->
    <section class="section">
      <h2 class="section-title">MV</h2>
      <div class="tabs">
        <div class="tab active">精选</div>
        <div class="tab">华语</div>
        <div class="tab">韩国</div>
        <div class="tab">港台</div>
        <div class="tab">欧美</div>
        <div class="tab">日本</div>
      </div>
      <div class="list-container">
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=12"
            alt="MV封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">向宿命挥拳的人（《新神榜：哪吒重生》电影主题曲）</div>
            <div class="list-artist">周深</div>
          </div>
          <div class="list-duration">03:02</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=13"
            alt="MV封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">Sunroof</div>
            <div class="list-artist">Nicky Youre</div>
          </div>
          <div class="list-duration">03:34</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=14"
            alt="MV封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">一路向北（《头文字D》电影插曲）</div>
            <div class="list-artist">周杰伦</div>
          </div>
          <div class="list-duration">04:59</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=15"
            alt="MV封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">我们的时光</div>
            <div class="list-artist">赵雷</div>
          </div>
          <div class="list-duration">04:05</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=16"
            alt="MV封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">遇到（《恶作剧之吻》电视剧原声）</div>
            <div class="list-artist">方雅贤</div>
          </div>
          <div class="list-duration">03:19</div>
        </div>
        <div class="list-item">
          <img
            src="https://picsum.photos/50/50?random=17"
            alt="MV封面"
            class="list-cover"
          />
          <div class="list-info">
            <div class="list-title">泡沫</div>
            <div class="list-artist">邓紫棋</div>
          </div>
          <div class="list-duration">04:13</div>
        </div>
      </div>
    </section>
  </div>

  <script>
    // 标签切换逻辑：点击标签，切换 active 类
    const tabs = document.querySelectorAll(".tab");
    tabs.forEach((tab) => {
      tab.addEventListener("click", () => {
        tabs.forEach((t) => t.classList.remove("active"));
        tab.classList.add("active");
      });
    });
  </script>
</body>
</html>